<?php
use yii\widgets\ActiveForm;
use yii\helpers\Html;
use common\components\widgets\Datetimepicker;
Datetimepicker::widget(['timepicker' => 'true','datepicker'=>'false','format'=>'H:i','step'=>'5']);
?>
<div class="yx-praise-list-box yx-praise-box yx-radius2 zx-min-height yx-add-content-box"  >
    <?php $form = ActiveForm::begin(['enableAjaxValidation' => true,'enableClientValidation' => false,'options'=>['class'=>'form-validate']]); ?>
    <table width="100%" class="table-form" >
        <tr>
            <th class="zx-goods-table"><?= $model->attributeLabels()['name']; ?></th>
            <td><?= $form->field($model, 'name', ['template' => '{input}{hint}{error}'])->textInput(['class' => 'input-text']) ?></td>
        </tr>
        <tr>
            <th class="zx-goods-table"><?= $model->attributeLabels()['img']; ?></th>
            <td><?= $form->field($model, 'img', ['template' => '{input}{hint}{error}'])->widget(\doumiaoduo\ueditor\ImageUploadSingle::className(),[
                    'clientOptions'=>['serverUrl'=>\common\components\helpers\Fun::url(['/uploader/action']),],
                    'buttonOptions'=>['class'=>'button'],
                    ])->hint('此图片优先显示') ?></td>
        </tr>
        <tr>
            <th class="zx-goods-table"><?= $model->attributeLabels()['mobile']; ?></th>
            <td><?= $form->field($model, 'mobile', ['template' => '{input}{hint}{error}'])->textInput(['class' => 'input-text'])->hint('请填写手机号!该手机号将作为账号!' )?></td>
        </tr>
        <tr>
            <th class="zx-goods-table"><?= $model->attributeLabels()['account']; ?></th>
            <td><?= $form->field($model, 'account', ['template' => '{input}{hint}{error}'])->textInput(['class' => 'input-text','readonly'=>'readonly'])?></td>
        </tr>
        <tr>
            <th class="zx-goods-table"><?= $model->attributeLabels()['sex']; ?></th>
            <td><?= $form->field($model, 'sex', ['template' => '{input}{hint}{error}'])->radioList(['0'=>'女','1'=>'男'],['prompt'=>'请选择分类','class' => 'input-dropdownlist']) ?></td>
        </tr>
        <tr>
            <th class="zx-goods-table"><?= $model->attributeLabels()['age']; ?></th>
            <td style="display: inline-block;width: 206px"><?= $form->field($model, 'age', ['template' => '{input}{error}{hint}'])->widget(\kartik\select2\Select2::className(),['data'=>$year,'options' => ['placeholder' => '请选择']]) ?></td>
        </tr>
        <tr>
            <th class="zx-goods-table"><?= $model->attributeLabels()['mechanic_id']; ?></th>
            <td style="display: inline-block;width: 206px"><?= $form->field($model, 'mechanic_id', ['template' => '{input}{error}{hint}'])->widget(\kartik\select2\Select2::className(),['data'=>$mechanic,'options' => ['placeholder' => '请选择']]) ?></td>
        </tr>


        <tr>
            <th class="zx-goods-table"><?= $model->attributeLabels()['cate_id']; ?></th>
            <td><?= $form->field($model, 'cate_id', ['template' => '{input}{hint}{error}'])->radioList([1=> '益智', 2=> '音乐', 3=> '形体',],['class' => 'input-dropdownlist']) ?></td>
        </tr>
        <tr>
            <th class="zx-goods-table"><?= $model->attributeLabels()['status']; ?></th>
            <td><?= $form->field($model, 'status', ['template' => '{input}{hint}{error}'])->radioList(['0'=>'不启用','1'=>'启用'],['prompt'=>'请选择状态','class' => 'input-dropdownlist']) ?></td>
        </tr>
        <tr>
            <th class="zx-goods-table"><?= $model->attributeLabels()['area']; ?></th>
            <td><?= $form->field($model, 'area', ['template' => '{input}{hint}{error}'])->textInput(['class' => 'input-text']) ?></td>
        </tr>
        <tr>
            <th class="zx-goods-table"><?= $model->attributeLabels()['address']; ?></th>
            <td><?= $form->field($model, 'address', ['template' => '{input}{hint}{error}'])->textInput(['class' => 'input-text']) ?></td>
        </tr>

        <tr>
            <th class="zx-goods-table"><?= $model->attributeLabels()['email']; ?></th>
            <td><?= $form->field($model, 'email', ['template' => '{input}{hint}{error}'])->textInput(['class' => 'input-text']) ?></td>
        </tr>

        <tr>
            <th class="zx-goods-table"><?= $model->attributeLabels()['description']; ?></th>
            <td><?= $form->field($model, 'description', ['template' => '{input}{hint}{error}'])->widget(\doumiaoduo\ueditor\Ueditor::className(),['clientOptions'=>[
                    'serverUrl'=>\common\components\helpers\Fun::url(['/uploader/action']),
                    'toolbars'=>[['fullscreen', 'source', '|', 'undo', 'redo', '|','bold', 'italic', 'underline', 'fontborder', 'strikethrough', 'superscript', 'subscript','rowspacingtop', 'rowspacingbottom', 'lineheight', '|','justifyleft', 'justifycenter', 'justifyright', 'justifyjustify','simpleupload','removeformat']],
                    'initialFrameWidth'=>'60%'
                ],]);?></td>
        </tr>

    </table>
    <div class="yx-submit-box" style="width: 100%">
        <?= \yii\helpers\Html::submitButton('提交', ['class' => "button yx-submit", 'id' => 'dosubmit']) ?>
    </div>
</div>

<?php \yii\widgets\ActiveForm::end(); ?>


<script>
</script>

